﻿/*------------------------------------------------
// File Description: Cabinet DataBase Entity
// Author:			 Crane
// Create Time:		 2020-07-20 03:27:14
//------------------------------------------------*/

using System;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace IOA.MES.DataAccess.Entity
{
    /// <summary>
    /// 装柜
    /// </summary>
    [Table(nameof(Cabinet))]
    public class Cabinet : BaseEntity
    {
        private string _orderNo = string.Empty;
        private string _workOrderNo = string.Empty;
        private string _cabinetNo = string.Empty;
        private string _nameplateModel = string.Empty;
        private string _iVCurrentLevel = string.Empty;
        private string _qLevel = string.Empty;
        private string _componentColor = string.Empty;
        private string _junBoxSpecs = string.Empty;
        private string _junBoxFactory = string.Empty;
        private string _backPlanSpecs = string.Empty;
        private string _backPlanFactory = string.Empty;
        private string _aluFrameSpecs = string.Empty;
        private string _aluFrameFactory = string.Empty;
        private string _batterySpecs = string.Empty;
        private string _batteryFactory = string.Empty;
        private string _warehouseCode = string.Empty;
        private string _warehouseName = string.Empty;
        private string _innerOrderNo = string.Empty;
        private string _productCode = string.Empty;
        private string _productName = string.Empty;
        private string _productSpecs = string.Empty;

        #region Public Property

        ///<Summary>
        /// 订单号
        ///</Summary>
        public string OrderNo
        {
            get { return string.IsNullOrWhiteSpace(_orderNo) ? string.Empty : _orderNo; }
            set { _orderNo = value; }
        }

        ///<Summary>
        /// 内部订单号
        ///</Summary>
        public string InnerOrderNo
        {
            get { return string.IsNullOrWhiteSpace(_innerOrderNo) ? string.Empty : _innerOrderNo; }
            set { _innerOrderNo = value; }
        }

        ///<Summary>
        /// 工单号
        ///</Summary>
        public string WorkOrderNo
        {
            get { return string.IsNullOrWhiteSpace(_workOrderNo) ? string.Empty : _workOrderNo; }
            set { _workOrderNo = value; }
        }

        ///<Summary>
        /// 产品料号
        ///</Summary>
        public string ProductCode
        {
            get { return string.IsNullOrWhiteSpace(_productCode) ? string.Empty : _productCode; }
            set { _productCode = value; }
        }

        ///<Summary>
        /// 产品名称
        ///</Summary>
        public string ProductName
        {
            get { return string.IsNullOrWhiteSpace(_productName) ? string.Empty : _productName; }
            set { _productName = value; }
        }

        ///<Summary>
        /// 成品物料规格
        ///</Summary>
        public string ProductSpecs
        {
            get { return string.IsNullOrWhiteSpace(_productSpecs) ? string.Empty : _productSpecs; }
            set { _productSpecs = value; }
        }

        ///<Summary>
        /// 柜号
        ///</Summary>
        public string CabinetNo
        {
            get { return string.IsNullOrWhiteSpace(_cabinetNo) ? string.Empty : _cabinetNo; }
            set { _cabinetNo = value; }
        }

        ///<Summary>
        /// 铭牌型号
        ///</Summary>
        public string NameplateModel
        {
            get { return string.IsNullOrWhiteSpace(_nameplateModel) ? string.Empty : _nameplateModel; }
            set { _nameplateModel = value; }
        }

        ///<Summary>
        /// 功率档
        ///</Summary>
        public decimal IVPowerLevel { get; set; }

        ///<Summary>
        /// 电流档
        ///</Summary>
        public string IVCurrentLevel
        {
            get { return string.IsNullOrWhiteSpace(_iVCurrentLevel) ? string.Empty : _iVCurrentLevel; }
            set { _iVCurrentLevel = value; }
        }

        ///<Summary>
        /// 组建等级
        ///</Summary>
        public string QLevel
        {
            get { return string.IsNullOrWhiteSpace(_qLevel) ? string.Empty : _qLevel; }
            set { _qLevel = value; }
        }

        ///<Summary>
        /// 组件颜色
        ///</Summary>
        public string ComponentColor
        {
            get { return string.IsNullOrWhiteSpace(_componentColor) ? string.Empty : _componentColor; }
            set { _componentColor = value; }
        }

        ///<Summary>
        /// 接线盒规格
        ///</Summary>
        public string JunBoxSpecs
        {
            get { return string.IsNullOrWhiteSpace(_junBoxSpecs) ? string.Empty : _junBoxSpecs; }
            set { _junBoxSpecs = value; }
        }

        ///<Summary>
        /// 接线盒厂家
        ///</Summary>
        public string JunBoxFactory
        {
            get { return string.IsNullOrWhiteSpace(_junBoxFactory) ? string.Empty : _junBoxFactory; }
            set { _junBoxFactory = value; }
        }

        ///<Summary>
        /// 背板规格
        ///</Summary>
        public string BackPlanSpecs
        {
            get { return string.IsNullOrWhiteSpace(_backPlanSpecs) ? string.Empty : _backPlanSpecs; }
            set { _backPlanSpecs = value; }
        }

        ///<Summary>
        /// 背板厂家
        ///</Summary>
        public string BackPlanFactory
        {
            get { return string.IsNullOrWhiteSpace(_backPlanFactory) ? string.Empty : _backPlanFactory; }
            set { _backPlanFactory = value; }
        }

        ///<Summary>
        /// 边框规格
        ///</Summary>
        public string AluFrameSpecs
        {
            get { return string.IsNullOrWhiteSpace(_aluFrameSpecs) ? string.Empty : _aluFrameSpecs; }
            set { _aluFrameSpecs = value; }
        }

        ///<Summary>
        /// 边框厂家
        ///</Summary>
        public string AluFrameFactory
        {
            get { return string.IsNullOrWhiteSpace(_aluFrameFactory) ? string.Empty : _aluFrameFactory; }
            set { _aluFrameFactory = value; }
        }

        ///<Summary>
        /// 电池规格
        ///</Summary>
        public string BatterySpecs
        {
            get { return string.IsNullOrWhiteSpace(_batterySpecs) ? string.Empty : _batterySpecs; }
            set { _batterySpecs = value; }
        }

        ///<Summary>
        /// 电池厂家
        ///</Summary>
        public string BatteryFactory
        {
            get { return string.IsNullOrWhiteSpace(_batteryFactory) ? string.Empty : _batteryFactory; }
            set { _batteryFactory = value; }
        }

        ///<Summary>
        /// 仓库代码
        ///</Summary>
        public string WarehouseCode
        {
            get { return string.IsNullOrWhiteSpace(_warehouseCode) ? string.Empty : _warehouseCode; }
            set { _warehouseCode = value; }
        }

        ///<Summary>
        /// 仓库名称
        ///</Summary>
        public string WarehouseName
        {
            get { return string.IsNullOrWhiteSpace(_warehouseName) ? string.Empty : _warehouseName; }
            set { _warehouseName = value; }
        }

        ///<Summary>
        /// 包数
        ///</Summary>
        public int PackQuantity { get; set; }

        ///<Summary>
        /// 状态
        ///</Summary>
        public Enum.CabinetStatus Status { get; set; }

        ///<Summary>
        /// 拼柜完成时间
        ///</Summary>
        public DateTime? FinishTime { get; set; }
        #endregion
    }

    public partial class MESContext
    {
        /// <summary>
        /// 装柜
        /// </summary>
        public virtual DbSet<Cabinet> Cabinets { get; set; }
    }
}